package com.wc.alorithm_blue_bridge._动态规划.树形DP.非对称二叉树;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/5/22 17:02
 * @description https://www.lanqiao.cn/problems/17139/learning/?problem_list_id=33&page=1
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 35;
    // f[i][j] the ith node, the height is j 's numbers
    static long[][] f = new long[N][N];
    static int n, k;

    public static void main(String[] args) {
        n = sc.nextInt();
        k = sc.nextInt();
        f[0][0] = 1;
        f[1][1] = 1;
        for (int i = 2; i <= n; i++) {
            for (int l = 0; l < i; l++) {
                int r = i - l - 1;
                for (int lh = 0; lh <= l; lh++) {
                    for (int rh = 0; rh <= r; rh++) {
                        if (Math.max(lh, rh) >= k * Math.min(lh, rh)) {
                            f[i][Math.max(lh, rh) + 1] += f[l][lh] * f[r][rh];
                        }
                    }
                }
            }
        }
        long res = 0;
        for (int i = 1; i <= n; i++) {
            res += f[n][i];
        }
        out.println(res);
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
